/*we should realize the nature of heap order.In a heap,for each node X,the key
in the father of X is less than the key in X,except for the root node*/

#ifndef _BinaryHeap
#define ElementType int
#define MinPQSize 1
#define MinData 0
struct HeapStruct;
typedef struct HeapStruct *PriorityQueue;

PriorityQueue Initialize(int MaxElements);
void Destory(PriorityQueue H);
void MakeEmpty(PriorityQueue H);
void Insert(ElementType X, PriorityQueue H);
ElementType DeleteMin(PriorityQueue H);
ElementType FindMin(PriorityQueue H);
int isEmpty(PriorityQueue H);
int IsFull(PriorityQueue H);

struct HeapStruct
{
    int Capacity;
    int Size;
    ElementType *Elements;
};

#endif